<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>设置</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
      <style>
          body{
            background-color: #fcfcfc;
            height:100%;
            padding-top:40px;
          }
          .top{
            width: 100%;height:40px;background-color: #f5f5f5;
            line-height: 40px;
          }
          .leftreturn{
            width:25px;
            height:25px;
            margin:7.5px;
            float: left;
          }
          .header{
            width: 100%;height:40px;border-bottom:1px solid #e1e1e1;
          }

          table{
            width:100%;
          }
          .sz_tab{
            width: 90%;
            height: auto;
            background-color: #fff;
            border-radius: 8px;
            border: 1px solid #ccc;
            margin:0 auto;
          }
          .sz_tab1{
            width: 100%;
            height: auto;
            background-color: #fff;
            border: 1px solid #ccc;
          }
          .sz_tab li{
            padding: 10px;
            font-family: kaiti;
            font-size: 16px;
            border-bottom: 1px solid #ccc;
          }
          .sz_tab1 li{
            padding: 10px;
            font-family: kaiti;
            text-align: center;
            font-size: 16px;
            border-bottom: 1px solid #ccc;
          }
          .sz_tab li:last-child{
            border-bottom: none;
          }
          .sz_tab1 li:last-child{
            border-bottom: none;
          }
          .rightreturn{
            width: 16px;
            height: 16px;
            line-height: 36px;
            float: right;
          }
          .rightreturn1{
            width: 27px;
            height: 15px;
            line-height: 36px;
            float: right;
          }
          .bgcolor{
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: #f5f5f5;
            z-index: -1;
          }
      </style>
  </head>
  <body>
    <div class="bgcolor">
      <div class="top">
        <img src="../../image/leftreturn.png" alt="" class="leftreturn" onclick="Winclose();">
        <span>个人信息</span>
      </div>
    <div class="header">
      <img src="../../image/leftreturn.png" alt="" class="leftreturn" onclick="Winclose();">
    </div>
    <table>
      <tr>
        <td style="padding: 5px 10px;
        font-family: songti;
        font-size: 16px;">安全设置</td>
      </tr>
      <tr>
        <td>
          <ul  class="sz_tab">
            <li onclick="editpaypw();">修改支付密码 <img src="../../image/rightreturn.png" alt="" class="rightreturn"></li>
            <li onclick="editloginpw();">修改登录密码<img src="../../image/rightreturn.png" alt="" class="rightreturn"></li>
          </ul>
        </td>
      </tr>
      <tr>
        <td  style="padding: 5px 10px;
        font-family: songti;
        font-size: 16px;">通知设置</td>
      </tr>
      <tr>
        <td>
          <ul class="sz_tab">
            <li>接收通知
            <script>
            function change_pic() {
              var imgObj = document.getElementById("caocao_pic");
              if (imgObj.getAttribute("src", 2) == "../../image/fou.png") {
                imgObj.src = "../../image/yes.png";
              }
              else {
                imgObj.src = "../../image/fou.png";
              }
            }
            </script>
            <img src="../../image/fou.png" class="rightreturn1" id="caocao_pic"onClick="change_pic()"/> </li>
            <li>声音提醒
            <img src="../../image/fou.png" class="rightreturn1" id="caocao_pic1"onClick="change_pic1()"/>
            <script>
            function change_pic1() {
              var imgObj = document.getElementById("caocao_pic1");
              if (imgObj.getAttribute("src", 2) == "../../image/fou.png") {
                imgObj.src = "../../image/yes.png";
              }
              else {
                imgObj.src = "../../image/fou.png";
              }
            }
            </script></li>
          </ul>
        </td>
      </tr>
      <tr>
        <td style="padding: 5px 10px;
        font-family: songti;
        font-size: 16px;">顺行</td>
      </tr>
      <tr>
        <td>
          <ul class="sz_tab">
            <li onclick="aboutus();">关于我们<img src="../../image/rightreturn.png" alt="" class="rightreturn"></li>
            <li>客服热线：123456789</li>
          </ul>
        </td>
      </tr>
      <tr>
        <td height="40px;"></td>
      </tr>
      <tr>
        <td style="padding: 10px;
        font-family: kaiti;
        text-align: center;
        font-size: 16px;background-color:#fff;" onclick="loginout()">切换账号</td>
      </tr>
      <tr>
        <td height="10px;"></td>
      </tr>
      <tr>
        <td  style="padding: 10px;
        font-family: kaiti;
        text-align: center;
        font-size: 16px;background-color:#fff;"  onclick="loginout()">
          退出登录</td>
      </tr>
    </table>
    </div>
  </body>
  <script type="text/javascript" src="../../script/SHA1.js"></script>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/doT.min.js"></script>
  <script type="text/javascript">
        userInfor = $api.getStorage('userInfor');
        //获取X-APICloud-AppKey值
        var now = Date.now();
        appKey = SHA1("A6032422409194"+"UZ"+"808CF36B-60D4-DC5D-C9F3-FB49F9E1FB44"+"UZ"+now)+"."+now

        function loginout(){

        api.ajax({
            url: 'https://d.apicloud.com/mcm/api/user/logout',
            method: 'post',
            cache: false,
            headers:{
              "X-APICloud-AppId": "A6032422409194",
              "X-APICloud-AppKey": appKey,
              "authorization":userInfor.id
            }
        },function(ret, err){
            if (ret) {
            $api.rmStorage('userInfor');
            api.closeToWin({
                name: 'root'
            });

            api.rebootApp();
            } else {
                $api.toast('警告', '退出失败',  2000);

            }
        });



        }
        function editloginpw(){
          api.openWin({
      		        name: 'editloginpw',
      		        url: './editloginpw.html',
      		        opaque: true,
      		        vScrollBarEnabled: false
      		});
        }
        function editpaypw(){
          api.openWin({
      		        name: 'editpaypw',
      		        url: './editpaypw.html',
      		        opaque: true,
      		        vScrollBarEnabled: false
      		});
        }
        function aboutus(){
          api.openWin({
                  name: 'gywm',
                  url: './gywm.html',
                  opaque: true,
                  vScrollBarEnabled: false
          });
        }
        function Winclose() {
      		api.closeWin();
      	}
  </script>
  </html>
